<template>
	<div class="app">
		<h1>我是App组件</h1>
		<button @click="isShow = !isShow">点我隐藏/显示 Child1</button>
		<br>
		<Child1 v-if="isShow"/>
		<br>
		<Child2/>
	</div>
</template>

<script>
	import Child1 from './components/Child1.vue'
	import Child2 from './components/Child2.vue'

	export default {
		name:'App',
		components:{Child1,Child2},
		data() {
			return {
				isShow:true
			}
		},
	}
</script>

<style>
	.app{
		background-color: gray;
		padding: 20px;
	}
</style>